<include file="__VIEW__/Public/userinfoHead.html" />
<!--个人中心主体-->

<link rel="stylesheet" href="__VIEW__/css/takaddr.css" />
<div id="content">
	<!--面包屑-->
	<div class="location">
		您当前的位置：
		<a href="">凡客首页</a> >
		<a href="">我的凡客</a> >
		<a href="">收货地址</a>
	</div>
	<!--面包屑-->
	<div class="main">
		<!--个人中心左边-->
		<include file="__VIEW__/Public/userinfo_left.html" />
		<!--个人中心中心右边-->
		<div class="right">
			<div class="title">
				<p>
					收货地址
				</p>
			</div>
			<!--收货地址-->
			<div class="address">
				<table width="500">
					<tr align="center" height="30" class="th">
						<td>收货人 </td>
						<td>详细地址 </td>
						<td>电话/手机 </td>
						<td>操作 </td>
					</tr>
					<foreach from="$addrs" key="$key" value="$val">
						<tr class="listRow" reid="{$val.reid}" >
							<td align="center">{$val.re_name}</td>
							<td align="left">{$val.address}</td>
							<td align="center">{$val.re_phone}</td>
							<td align="center">
								<if value="$val['is_default']==0">
									<a href="javascript:;" class="addrdefault">默认地址</a>
									<else/>
									<a href="javascript:;" style="color:red;" class="isdefault" >当前默认地址</a>
								</if>
								<br />
								<a href="javascript:;"  class="editAddr">编辑</a> &nbsp;
								<a href="javascript:;" data-reid="{$val.reid}" class="delAddr">删除</a>
							</td>
						</tr>
					</foreach>
				</table>
				<!--地址分页-->
				<!--<div class="listRowPage">
							<p><span>1</span>/<span>4</span>
							</p>
							<a href="" class="leftArrow"></a>
							<a href="" class="rightArrow"></a>
						</div>-->
				<!--添加地址-->
				<div class="addAddr">
					<a href="">添加地址 <span class="doubleArrow"></span></a>
				</div>
				<!--添加地址主体表单-->
				<div class="addMain">
					<form action="javascript:;" id="addAddr">
						<input type="hidden" name="uid" value="{$hd.session.uid}" />
						<div class="form-group">
							<input type="hidden" name="reid" value="{$currentaddr.reid}" />
							<label for="name"><span style="color:#B81B22">*</span>收货人：</label>
							<div class="inputs">
								<input type="text" style="height:25px;" value="{$currentaddr.re_name}" name="re_name" placeholder="请准确填写真实姓名" />
							</div>
						</div>
						<div class="form-group">
							<label for="name"><span style="color:#B81B22">*</span>地&nbsp;&nbsp;区：</label>
							<div class="inputs">
								<select name="prov" id="province" style="height:25px;">
									<option value="0">--省份/直辖市--</option>
									<foreach from="$prov" key="$pkey" value="$pval">
										<option value="{$pval.provid}" <if value="$pval['provid']==$currentaddr['re_addarea'][0]">selected="selected"</if> >{$pval.provname}</option>
									</foreach>
								</select>
								<select name="city" id="city" style="height:25px;">
									<option value="0">--市级--</option>
								</select>
								<select name="dist" id="dist" style="height:25px;">
									<option value="0">--县级/地区--</option>
								</select>
							</div>
						</div>
						<div class="form-group">
							<label for="address"><span style="color:#B81B22">*</span>详细地址：</label>
							<div class="inputs">
								<input type="text" id="address" value="{$currentaddr.re_address}" name="re_address" placeholder="请填写详细路及门牌号码" />
							</div>
						</div>
						<div class="form-group">
							<label for="zipcode"><span style="color:#B81B22">*</span>邮政编码：</label>
							<div class="inputs">
								<input type="text" id="zipcode" name="re_zipcode" value="{$currentaddr.re_zipcode}" placeholder="请填写邮政编码" />
							</div>
						</div>
						<div class="form-group">
							<label for="telphone"><span style="color:#B81B22">*</span>电话：</label>
							<div class="inputs">
								<input type="text" id="telphone" name="re_phone" value="{$currentaddr.re_phone}" placeholder="手机号码或座机号码" />
							</div>
						</div>
						<div class="form-group">
							<!--添加地址按钮-->
							<a href="javascript:;" class="addAddressBtn"></a>
						</div>
					</form>
				</div>
			</div>
		</div>

	</div>
</div>
<script>
	var delAddr = "{|U:'ReceiveAddr/del'}";
	var editAddr = "{|U:'ReceiveAddr/ajaxEditAddr'}";
	var loading = "__STATIC__/Img/loading.gif";
	var subEdit = "{|U:'ReceiveAddr/subEdit'}";
	var ajaxCity = "{|U:'ajaxCity'}";
	var ajaxDist = "{|U:'ajaxDist'}";
	var defaultAddr = "{|U:'ReceiveAddr/defaultAddr'}";
	var addAddr = "{|U:'ReceiveAddr/addAddr'}";
</script>
<script src="__VIEW__/js/editAddr.js"></script>
<!--个人中心主体结束-->

<!-- 页脚开始 -->
<include file="__VIEW__/Public/userinfo_foot.html" />
<!-- 页脚结束 -->
</body>

</html>